/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package at.dcmspl;

import java.io.IOException;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.transaction.SystemException;

/**
 * The Testclients
 * @author Hannes Stornig, Gosch Daniel
 */
@Stateless
@LocalBean
public class testClient {
    //@EJB
    //private static ProcessingNodeRemote ProcessingNode;
    
    public static void main(String[] args) throws IOException, NamingException, IllegalStateException, SystemException{
        Context context = new InitialContext();  
        //Bean Based Transaction
        //ProcessingNodeRemote ProcessingNode = (ProcessingNodeRemote) context.lookup("java:global/DcmQueueService-ejb/ProcessingNodeBMT!at.dcmspl.ProcessingNodeBMTRemote"); 
        //ProcessingNode.doSomething();
        //Container Based Transaction
        ProcessingNodeCBTRemote pn = (ProcessingNodeCBTRemote) context.lookup("java:global/DcmQueueService-ejb/ProcessingNodeCBT!at.dcmspl.ProcessingNodeCBTRemote");
        pn.doSomething2();
        pn.doSomething();
    }
}
